<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/bootstrap.min.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/bootstrap-responsive.min.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/uniform.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/matrix-style2.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/matrix-media.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/font-awesome/css/font-awesome.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/changyun.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
	<style>
		.table th,.table td{line-height: 20px;text-align: center;border-top: 1px solid #ddd;padding:5px 0 5px 10px;vertical-align: middle;}
	</style>
</head>
<body>
<div id="content">
  <include file="Public/maintop" />
  <div class="container-fluid">
    <div class="row-fluid">
      <div class="span12">
        <div class="widget-box">
			<div class="cyz-m-tab">
				<ul class="cyz-m-tab-title">
					<li class="cyz-m-this" href="javascript:void(0);">企业管理</li>
				</ul>
			</div>
		  <div class="widget-content" style="padding:5px;border:0px;">
			  <div class="fl table-button">
				  <div class="btn-group">
					  <a href="{#:U('edit')}" class="btn btn-success"><i class="icon-plus"></i> 新增企业</a>
				  </div>
			  </div>
			<form action="__ACTION__" method="get">
				<div class="table-button" id="city_4">
					<div class="fr table-button"><button type="submit" class="btn btn-success"><i class="icon-search"></i> 搜索</button></div>
					<div class="fr table-button">
					<input type="text" name="name" placeholder="请输入企业名称" value="{#$getting.name}">
					</div>
				</div>
			</form>
		  </div>

          <div class="widget-content" style="padding:5px;">
            <table class="table table-bordered table-striped with-check">
              <thead>
                <tr>
				  <th width="80">ID</th>
				  <th>企业名称</th>
<!--				  <th>企业LOGO</th>-->
				  <th>详细地址</th>
				  <th>添加时间</th>
				  <th>操作</th>
                </tr>
              </thead>
              <tbody>
			  <notempty name="list_data.list_data">
			  <volist name="list_data.list_data" id="admin">
                <tr>
				  <td style="width:60px;">{#$admin.id}</td>
					<td style="text-align: center;">
						{#$admin.company_name}
					</td>
<!--					<td style="text-align: center;">-->
<!--						<neq name="admin.company_logo" value="0">-->
<!--							<img src="{#$admin.company_logo}" style="width: 60px;height: 60px;" />-->
<!--						</neq>-->
<!--						<eq name="admin.company_logo" value="">-->
<!--							&#45;&#45;-->
<!--						</eq>-->
<!--					</td>-->

					<td style="text-align: left;">
						{#$admin.company_address}
					</td>
					<td>{#$admin.add_time}</td>
					<td style="width:220px;">
					<a title="编辑" href="{#:U('edit?id='.$admin['id'])}" class="btn btn-mini btn-success"><i class="icon-pencil"></i> 编辑</a>
						<a title="删除" href="javascript:void(0);" onclick="dodel('{#:U('del?id='.$admin['id'])}')" class="btn btn-mini btn-danger"><i class="icon-remove"></i> 删除</a>
					</td>
                </tr>
				</volist>
				<else/>
				<td colspan="11" class="text-center"> 暂时还没有商家! </td>
				</notempty>
              </tbody>
            </table>
			<div id="hongxin_page_view">{#$list_data._page}</div>
          </div>
        </div>
	  </div>
    </div>
  </div>
</div>
<script src="__PUBLIC__/Admin/js/jquery.min.js"></script>
<script src="__PUBLIC__/Admin/js/jquery.ui.custom.js"></script>
<script src="__PUBLIC__/Admin/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/Admin/js/jquery.uniform.js"></script>
<script src="__PUBLIC__/Admin/js/matrix.js"></script>
<script src="__PUBLIC__/Admin/js/matrix.tables.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script src="__PUBLIC__/Admin/js/common.js"></script>
<script>
function dodel(jump_url){
	layer.confirm('确定要删除吗', {
		title:'提示',
		icon: 0,
		btn: ['确定','取消'] //按钮
	}, function(e){
		window.location.href = jump_url;
		layer.close(e);
	}, function(e){
		layer.close(e);
	});
}
function get_rcode_info(url) {
    layer.open({
        type : 2,
        offset: '100px',
        title : '二维码',
        area : ['460px', '490px'],
        content:url,
        success: function(layero, index){
            //layer.iframeAuto(index);
        }
    });
}
function changstatus(field,status,aid,e){
    var loadi = null;
    loadi = layer.load(2);
    $.ajax({
        type: "GET",
        url: "__CONTROLLER__/setstatus",
        data:{field:field,status:status,aid:aid},
        dataType: "html",
        success: function(data){
            layer.close(loadi);
            $(e).parent("td").html(data);
        },
        error: function(XMLHttpRequest, textStatus, errorThrown){

        }
    });
}
</script>
<script>
    var city_js_root = "__PUBLIC__/js/citySelect/";
</script>
<script type="text/javascript" src="__PUBLIC__/js/citySelect/jquery.cityselect.js"></script>
<script>
    $("#city_4").citySelect({
        prov: "{#$getting.u_province}",
        city: "{#$getting.u_city}",
        dist: "{#$getting.u_district}",
        required: false
    });
</script>
</body>
</html>
